home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / doom / quake_ad.zip / WAIT4P99.ZIP / WAIT4PL.QC < prev    next >
Text File  |  1997-03-14  |  21KB  |  390 lines

  1. void() WaitforPlayer =
  2. {
  3.         local float     timelimit;
  4.         local float     fraglimit;
  5.         local float     NowInGame;
  6.         local entity    e;
  7.         local string    conn;
  8.         local float     ShouldConnect;
  9.         local float     RoundedTime;
  10.  
  11.         ShouldConnect = cvar("temp1");     //number of players to connect
  12.     timelimit = cvar("timelimit") * 60;
  13.         RoundedTime=floor(time);
  14.         if (RoundedTime < 1) Message=0;
  15.         if (RoundedTime > 250) RoundedTime=RoundedTime - 250;
  16.                         
  17.  
  18.         if (ShouldConnect==0)
  19.         {
  20.                 UseWait4Player=1;
  21.                 return;
  22.         }
  23.         e = find(world, classname, "player");
  24.         while (e)
  25.         {
  26.                 NowInGame=NowInGame+1;
  27.                 e = find(e, classname, "player");
  28.         }
  29.  
  30.         self.button0 = 0;//disable Fire,Jump,Use
  31.         self.button1 = 0;
  32.         self.button2 = 0;
  33.         self.pausetime = time + 3;//disable moving
  34.  
  35.         if (ShouldConnect==2)
  36.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 2...";
  37.         if (ShouldConnect==3)
  38.         {
  39.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 3...";else                
  40.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 3...";
  41.         }
  42.         if (ShouldConnect==4)
  43.         {
  44.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 4...";else                
  45.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 4...";else                
  46.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 4...";
  47.         }
  48.         if (ShouldConnect==5)
  49.         {
  50.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 5...";else                
  51.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 5...";else                
  52.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 5...";else                
  53.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 5...";
  54.         }
  55.         if (ShouldConnect==6)
  56.         {
  57.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 6...";else                
  58.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 6...";else                
  59.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 6...";else                
  60.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 6...";else                
  61.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 6...";
  62.         }
  63.         if (ShouldConnect==7)
  64.         {
  65.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 7...";else                
  66.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 7...";else                
  67.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 7...";else                
  68.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 7...";else                
  69.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 7...";else                
  70.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 7...";
  71.         }
  72.         if (ShouldConnect==8)
  73.         {
  74.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 8...";else                
  75.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 8...";else                
  76.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 8...";else                
  77.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 8...";else                
  78.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 8...";else                
  79.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 8...";else                
  80.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 8...";
  81.         }
  82.         if (ShouldConnect==9)
  83.         {
  84.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 9...";else                
  85.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 9...";else                
  86.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 9...";else                
  87.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 9...";else                
  88.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 9...";else                
  89.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 9...";else                
  90.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 9...";else
  91.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 9...";
  92.         }
  93.         if (ShouldConnect==10)
  94.         {
  95.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 10...";else                
  96.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 10...";else                
  97.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 10...";else                
  98.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 10...";else                
  99.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 10...";else                
  100.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 10...";else                
  101.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 10...";else
  102.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 10...";else
  103.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 10...";
  104.         }
  105.         if (ShouldConnect==11)
  106.         {
  107.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 11...";else                
  108.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 11...";else                
  109.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 11...";else                
  110.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 11...";else                
  111.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 11...";else                
  112.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 11...";else                
  113.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 11...";else
  114.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 11...";else
  115.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 11...";else
  116.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 11...";
  117.         }
  118.         if (ShouldConnect==12)
  119.         {
  120.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 12...";else                
  121.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 12...";else                
  122.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 12...";else                
  123.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 12...";else                
  124.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 12...";else                
  125.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 12...";else                
  126.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 12...";else
  127.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 12...";else
  128.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 12...";else
  129.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 12...";else
  130.                 if (NowInGame==11) conn="11 Players found\nLooking for number 12 of 12...";
  131.         }
  132.         if (ShouldConnect==13)
  133.         {
  134.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 13...";else                
  135.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 13...";else                
  136.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 13...";else                
  137.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 13...";else                
  138.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 13...";else                
  139.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 13...";else                
  140.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 13...";else
  141.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 13...";else
  142.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 13...";else
  143.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 13...";else
  144.                 if (NowInGame==11) conn="11 Players found\nLooking for number 12 of 13...";else
  145.                 if (NowInGame==12) conn="12 Players found\nLooking for number 13 of 13...";
  146.         }
  147.         if (ShouldConnect==14)
  148.         {
  149.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 14...";else                
  150.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 14...";else                
  151.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 14...";else                
  152.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 14...";else                
  153.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 14...";else                
  154.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 14...";else                
  155.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 14...";else
  156.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 14...";else
  157.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 14...";else
  158.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 14...";else
  159.                 if (NowInGame==11) conn="11 Players found\nLooking for number 12 of 14...";else
  160.                 if (NowInGame==12) conn="12 Players found\nLooking for number 13 of 14...";else
  161.                 if (NowInGame==13) conn="13 Players found\nLooking for number 14 of 14...";
  162.         }
  163.         if (ShouldConnect==15)
  164.         {
  165.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 15...";else                
  166.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 15...";else                
  167.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 15...";else                
  168.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 15...";else                
  169.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 15...";else                
  170.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 15...";else                
  171.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 15...";else
  172.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 15...";else
  173.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 15...";else
  174.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 15...";else
  175.                 if (NowInGame==11) conn="11 Players found\nLooking for number 12 of 15...";else
  176.                 if (NowInGame==12) conn="12 Players found\nLooking for number 13 of 15...";else
  177.                 if (NowInGame==13) conn="13 Players found\nLooking for number 14 of 15...";else
  178.                 if (NowInGame==14) conn="14 Players found\nLooking for number 15 of 15...";
  179.         }
  180.         if (ShouldConnect==16)
  181.         {
  182.                 if (NowInGame==1) conn="1 Player found\nLooking for number 2 of 16...";else                
  183.                 if (NowInGame==2) conn="2 Players found\nLooking for number 3 of 16...";else                
  184.                 if (NowInGame==3) conn="3 Players found\nLooking for number 4 of 16...";else                
  185.                 if (NowInGame==4) conn="4 Players found\nLooking for number 5 of 16...";else                
  186.                 if (NowInGame==5) conn="5 Players found\nLooking for number 6 of 16...";else                
  187.                 if (NowInGame==6) conn="6 Players found\nLooking for number 7 of 16...";else                
  188.                 if (NowInGame==7) conn="7 Players found\nLooking for number 8 of 16...";else
  189.                 if (NowInGame==8) conn="8 Players found\nLooking for number 9 of 16...";else
  190.                 if (NowInGame==9) conn="9 Players found\nLooking for number 10 of 16...";else
  191.                 if (NowInGame==10) conn="10 Players found\nLooking for number 11 of 16...";else
  192.                 if (NowInGame==11) conn="11 Players found\nLooking for number 12 of 16...";else
  193.                 if (NowInGame==12) conn="12 Players found\nLooking for number 13 of 16...";else
  194.                 if (NowInGame==13) conn="13 Players found\nLooking for number 14 of 16...";else
  195.                 if (NowInGame==14) conn="14 Players found\nLooking for number 15 of 16...";else
  196.                 if (NowInGame==15) conn="15 Players found\nLooking for number 16 of 16...";
  197.         }
  198.         centerprint (self,conn);
  199.  
  200.         if (NowInGame==ShouldConnect)
  201.         {
  202.                 local string    timel;
  203.                 bprint("All Players in the Game!\n");
  204.                 self.pausetime=0;
  205.                 if (timelimit!=0) //Adjusting timelimit if it's set
  206.                 {
  207.                         timelimit=timelimit+floor(time); //Old timelimit + actual time = new timelimit
  208.                         timel=ftos(rint(timelimit/60)); //Converting to minutes and into a string
  209.                         cvar_set("timelimit",timel);    //Setting new timelimit
  210.                 }
  211.                 UseWait4Player=1; //Avoiding this whole Wait4Player - loop
  212.                 centerprint (self,"╠┼╘'╙ ╥╧├╦ !");
  213.                 return;
  214.         }
  215.         
  216.         if (RoundedTime==10 && Message==0)
  217.         {
  218.                 bprint("Player ");
  219.                 bprint(ftos(NowInGame+1));
  220.                 bprint(" ...where are you?\n");
  221.                 Message=1;
  222.         }
  223.         if (RoundedTime==20 && Message==1)
  224.         {
  225.                 bprint("Pssst...If you go wake up Player ");
  226.                 bprint(ftos(NowInGame+1));
  227.                 bprint(",\nI'll put you in God mode.\n");
  228.                 Message=2;
  229.         }
  230.         if (RoundedTime==30 && Message==2)
  231.         {             
  232.                 bprint("Number ");
  233.                 bprint(ftos(NowInGame+1));
  234.                 bprint(" Player,\nour Number 1 delayer....\n");
  235.                 Message=3;
  236.         }
  237.         if (RoundedTime==40 && Message==3)
  238.         {             
  239.                 bprint("We're all Message, Player ");
  240.                 bprint(ftos(NowInGame+1));
  241.                 bprint(" ....\nHello, McFly!!!\n");
  242.                 Message=4;
  243.         }
  244.         if (RoundedTime==50 && Message==4)
  245.         {             
  246.                 bprint("You know, Message for Player ");
  247.                 bprint(ftos(NowInGame+1));
  248.                 bprint("\nreminds me of a story....\n");
  249.                 Message=5;
  250.         }
  251.         if (RoundedTime==60 && Message==5)
  252.         {             
  253.                 bprint("Two Player ");
  254.                 bprint(ftos(NowInGame+1));
  255.                 bprint("'s walk into a bar....\n");
  256.                 Message=6;
  257.         }
  258.         if (RoundedTime==70 && Message==6)
  259.         {             
  260.                 bprint("Is Player ");
  261.                 bprint(ftos(NowInGame+1));
  262.                 bprint(" running off\na removable drive or something?\n");
  263.                 Message=7;
  264.         }
  265.         if (RoundedTime==80 && Message==7)
  266.         {             
  267.                 bprint("INSTRUCTIONS: Player ");
  268.                 bprint(ftos(NowInGame+1));
  269.                 bprint(" starts quake....\n");
  270.                 Message=8;
  271.         }
  272.         if (RoundedTime==90 && Message==8)
  273.         {             
  274.                 bprint("Once Player ");
  275.                 bprint(ftos(NowInGame+1));
  276.                 bprint(" deigns to join us,\n let's toast 'em.\n");
  277.                 Message=9;
  278.         }
  279.         if (RoundedTime==100 && Message==9)
  280.         {             
  281.                 bprint("ANY TIME NOW PLAYER ");
  282.                 bprint(ftos(NowInGame+1));
  283.                 bprint("!!!\n");
  284.                 Message=10;
  285.         }
  286.         if (RoundedTime==110 && Message==10)
  287.         {             
  288.                 bprint("Player ");
  289.                 bprint(ftos(NowInGame+1));
  290.                 bprint(" is attempting to escape off the map.\n");
  291.                 Message=11;
  292.         }
  293.         if (RoundedTime==120 && Message==11)
  294.         {             
  295.                 bprint("How long can Player ");
  296.                 bprint(ftos(NowInGame+1));
  297.                 bprint(" take setting the damn thing up?\n");
  298.                 Message=12;
  299.         }
  300.         if (RoundedTime==130 && Message==12)
  301.         {             
  302.                 bprint("How many Player ");
  303.                 bprint(ftos(NowInGame+1));
  304.                 bprint("'s does it take to change a lightbulb?\n");
  305.                 Message=13;
  306.         }
  307.         if (RoundedTime==140 && Message==13)
  308.         {             
  309.                 bprint("None, 'cause they don't DO anything.\nThey just SIT there.\n");
  310.                 Message=14;
  311.         }
  312.         if (RoundedTime==150 && Message==14)
  313.         {             
  314.                 bprint("Um, I'm sure Player ");
  315.                 bprint(ftos(NowInGame+1));
  316.                 bprint(" will join us soon.\n");
  317.                 Message=15;
  318.         }
  319.         if (RoundedTime==160 && Message==15)
  320.         {             
  321.                 bprint("Sigh.  Player ");
  322.                 bprint(ftos(NowInGame+1));
  323.                 bprint(" is a toadie.\n");
  324.                 Message=16;
  325.         }
  326.         if (RoundedTime==170 && Message==16)
  327.         {             
  328.                 bprint("Who votes that Player ");
  329.                 bprint(ftos(NowInGame+1));
  330.                 bprint(" gets\nleft outta this game (y/n)?\n");
  331.                 Message=17;
  332.         }
  333.         if (RoundedTime==180 && Message==17)
  334.         {             
  335.                 bprint("Player ");
  336.                 bprint(ftos(NowInGame+1));
  337.                 bprint(" is starting to tick me off.\n");
  338.                 Message=18;
  339.         }
  340.         if (RoundedTime==190 && Message==18)
  341.         {             
  342.                 bprint("Lunch break's over, Player ");
  343.                 bprint(ftos(NowInGame+1));
  344.                 bprint("!\n");
  345.                 Message=19;
  346.         }
  347.         if (RoundedTime==200 && Message==19)
  348.         {             
  349.                 bprint("PLAYER ");
  350.                 bprint(ftos(NowInGame+1));
  351.                 bprint("!!!! GOON!\n");
  352.                 Message=20;
  353.         }
  354.         if (RoundedTime==210 && Message==20)
  355.         {             
  356.                 bprint("It seems Player ");
  357.                 bprint(ftos(NowInGame+1));
  358.                 bprint(" has gone for a Moon Pie.\n");
  359.                 Message=21;
  360.         }
  361.         if (RoundedTime==220 && Message==21)
  362.         {             
  363.                 bprint("Okay, when we start,\nI'm giving Player ");
  364.                 bprint(ftos(NowInGame+1));
  365.                 bprint(" only 5 hit points.\n");
  366.                 Message=22;
  367.         }
  368.         if (RoundedTime==230 && Message==22)
  369.         {             
  370.                 bprint("Player ");
  371.                 bprint(ftos(NowInGame+1));
  372.                 bprint(" is a popo-head.\n");
  373.                 Message=23;
  374.         }
  375.         if (RoundedTime==240 && Message==23)
  376.         {             
  377.                 bprint("Go give Player ");
  378.                 bprint(ftos(NowInGame+1));
  379.                 bprint(" a good swift kick in the...head.\n");
  380.                 Message=24;
  381.         }
  382.         if (RoundedTime==250 && Message==24)
  383.         {             
  384.                 bprint("What is Player ");
  385.                 bprint(ftos(NowInGame+1));
  386.                 bprint(" Waiting for ?\n   ├Φ≥Θ≤⌠φß≤ ???\n");
  387.                 Message=0;
  388.         }
  389. };
  390.